<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.util.*" errorPage="/error.jsp" %>
<%@ page import="com.beans.log.*" %>
<%@ page import="com.business.log.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<% String  title="日志列表"; %>
<%@include file="header.jsp"%>
<% 	LogListBus llb=new LogListBus();
	List logList=llb.getAllLogByUserName(username);
if(logList==null||logList.size()==0) {
%>
<br />
<center><font color=red>还没有日志!</font></center>
<br />
<% }
else{
%>
<p>日志列表：</p>
<table>
<tr><th width=40%>标题</th><th>内容简介</th><th>是否显示</th><th>功能选项</th></tr>
<%
for(int i=0;i<logList.size();i++) {
LogInfo li=(LogInfo)logList.get(i);
%>
  <tr>
        <td width="20%" ><a href="log/temp/<%=li.getLogNo()%>.html"><font color=green><%=li.getLogTitle()%></font></a></td>
  
            <td width="40%"><%=li.getLogIntro()%></td>
			 <td>&nbsp;<%if(li.getIsShow().equals("1")){%>是<%}else{%>否<%}%></td>
			  <td ><a href="updatelog?action=edit&no=<%=li.getLogNo()%>">编辑</a>&nbsp;&nbsp;<a href="updatelog?action=del&no=<%=li.getLogNo()%>">删除</a>&nbsp;</td>
			
  </tr>
		<%
		}
		%>
</table>
		<hr style="border: 1px dotted  #FFCC00 " />
		分类列表：
		<table cellspacing="10">
		<tr><th>分类名称</th><th>简介</th><th>功能</th></tr>
		<% 
			LogTypeBus ltb=new LogTypeBus();
			List logtypeList=ltb.getAllLogTypes(username);
			for(int i=0;i<logtypeList.size();i++) {
			LogType lt=(LogType)logtypeList.get(i);
		%>
		<tr><td><%=lt.getLogtypeName()%></td><td><%=lt.getLogtypeMemo()%></td><td><a href="updatelogtype?action=edit&id=<%=lt.getLogtypeId()%>">修改</a>&nbsp;&nbsp;<a href="updatelogtype?action=del&id=<%=lt.getLogtypeId()%>">删除</a></td></tr>
		<%
		}
		}
		%>
</table>
		<%@include file="footer.jsp"%>
</body>

</html>
